package com.aiwiown.face.request.facealbum;

import com.aiwiown.face.ApiMethod;
import com.aiwiown.face.ApiObject;
import com.aiwiown.face.ApiRequest;
import com.aiwiown.face.internal.util.RequestParamUtils;
import com.aiwiown.face.response.facealbum.FacealbumCreatealbumResponse;

import java.util.Map;

/**
 * 描述
 * 创建一个人脸相册 FaceAlbum，用于存储相片的image_id、相片中人脸标识face_token、以及人脸标识对应的聚类分组group_id。一个FaceAlbum能够存储10000个face_token。
 * 注意：免费用户可最多创建10个FaceAlbum，而付费用户没有相册数量限制。免费用户的相册自创建后会保存100天，然后会被删除。如果付费用户透支账户余额后，创建的FaceAlbum会保留30天，然后被删除。
 * 调用URL
 * https://api-cn.faceplusplus.com/imagepp/v1/facealbum/createalbum
 * @ClassName : FacealbumCreatealbumRequest
 * @Description :
 * @Author : dbin0123
 * @Date: 2020-06-13 15:26
 */
public class FacealbumCreatealbumRequest implements ApiRequest<FacealbumCreatealbumResponse> {

    private String apiVersion = "v1";
    private static String apiUrl = "/facealbum/createalbum";

    private String bizContent;
    private ApiObject bizModel = null;

    @Override
    public ApiMethod getApiMethod() {
        return ApiMethod.POST;
    }

    @Override
    public String getApiUrl() {
        return "/" + this.apiVersion + apiUrl;
    }

    @Override
    public Map<String, String> getTextParams() throws IllegalAccessException {
        return RequestParamUtils.getTextParams(this.bizModel);
    }

    @Override
    public Map<String, byte[]> getByteArrayParams() throws IllegalAccessException {
        return RequestParamUtils.getByteArrayParams(this.bizModel);
    }

    @Override
    public Class<FacealbumCreatealbumResponse> getResponseClass() {
        return FacealbumCreatealbumResponse.class;
    }

    @Override
    public String getApiVersion() {
        return this.apiVersion;
    }

    @Override
    public String getBizContent() {
        return this.bizContent;
    }

    public void setBizModel(ApiObject bizModel) {
        this.bizModel = bizModel;
    }

    @Override
    public String signVersion() {
        return null;
    }

    @Override
    public String getSignInfo(String apiKey, String secretKey) throws Exception {
        return null;
    }
}
